import Vue from 'vue';
import Router from 'vue-router';
import InitiateApplication from '@/views/InitiateApplication/';
// import WriteRebate from '@/views/WriteRebate/';
import WriteAskLeave from '@/views/WriteAskLeave/';
import WriteHolLeave from '@/views/WriteHolLeave/';
import ToDoList from '@/views/ToDoList/';
import ToDoDetail from '@/views/TodoDetail';
import ApplicationList from '@/views/ApplicationList/';
import ApplicationDetail from '@/views/ApplicationDetail/';
import SelectPerson from '@/views/SelectPerson/index.vue';
import EditAskLeaveDatetime from '@/views/EditAskLeaveDatetime/';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'InitiateApplication',
      component: InitiateApplication,
      meta: {
        title: '发起申请',
        bottomType: 'bottom-normal',
        keepAlive: false
      }
    },
    // {
    //   path: '/Write/Rebate',
    //   name: 'WriteRebate',
    //   component: WriteRebate,
    //   meta: {
    //     title: '合作申请',
    //     bottomType: 'bottom-submit',
    //     keepAlive: true
    //   }
    // },
    {
      path: '/Writes/AskLeave',
      name: 'WriteAskLeave',
      component: WriteAskLeave,
      meta: {
        title: '请假申请',
        bottomType: 'bottom-submit',
        keepAlive: true
      }
    },
    {
      path: '/Writes/HolLeave',
      name: 'WriteHolLeave',
      component: WriteHolLeave,
      meta: {
        title: '更改例假申请',
        bottomType: 'bottom-submit',
        keepAlive: true
      }
    },
    {
      path: '/Record/ToDoList',
      name: 'ToDoList',
      component: ToDoList,
      meta: {
        title: '审批记录',
        bottomType: 'bottom-normal',
        animateType: 'slide-left',
        keepAlive: true
      }
    },
    {
      path: '/Record/ApplicationList',
      name: 'ApplicationList',
      component: ApplicationList,
      meta: {
        title: '我的申请',
        bottomType: 'bottom-normal',
        animateType: 'slide-right',
        keepAlive: true
      }
    },
    {
      path: '/Record/ApplicationList/ApplicationDetail',
      name: 'ApplicationDetail',
      component: ApplicationDetail,
      meta: {
        title: '我的申请详情',
        keepAlive: false
      }
    },
    {
      path: '/Record/ToDoList/TodoDetail',
      name: 'ToDoDetail',
      component: ToDoDetail,
      meta: {
        title: '审批记录详情',
        keepAlive: false
        // bottomType: ''
      }
    },
    {
      path: '/Writes/MakeCopy/SelectPerson/',
      name: 'SelectPerson',
      component: SelectPerson,
      meta: {
        title: '选择抄送人',
        keepAlive: false
      }
    },
    {
      path: '/Writes/Secret',
      name: 'WriteSecret',
      component: () => import('@/views/WriteSecret'),
      meta: {
        title: 'A+保密协议申请',
        bottomType: 'bottom-submit',
        keepAlive: true
      }
    },
    {
      path: '/Writes/Key',
      name: 'WriteKey',
      component: () => import('@/views/WriteKey'),
      meta: {
        title: 'A+独家密钥申请',
        bottomType: 'bottom-submit',
        keepAlive: true
      }
    },
    {
      path: '/Writes/Contract',
      name: 'WriteContract',
      component: () => import('@/views/WriteContract'),
      meta: {
        title: '代理合同申请',
        bottomType: 'bottom-submit',
        keepAlive: true
      }
    },
    {
      path: '/Writes/FDH',
      name: 'WriteFDH',
      component: () => import('@/views/WriteFDH'),
      meta: {
        title: '付外佣申請',
        bottomType: 'bottom-submit',
        keepAlive: true
      }
    },
    {
      path: '/Record/ApplicationList/ApplicationDetail/EditAskLeaveDatetime',
      name: 'EditAskLeaveDatetime',
      component: EditAskLeaveDatetime,
      meta: {
        title: '缩短日期',
        keepAlive: false
      }
    }
  ]
});
